#ifndef BOOKMARK_H
#define BOOKMARK_H

#include <QObject>
#include "manga.h"

class Bookmark : public Resource
{
public:
    Bookmark();
    ~Bookmark();
    Bookmark(Manga * m,QString chap, QString page, int id,bool fin_atteinte = 0);
    Bookmark(int mangaid,QString nom, QString adr,QString chap,QString page,int id,bool fin_atteinte = 0);
    void setManga(Manga * m);
    void setManga(int mangaid,QString nom, QString adr);
    void setChapitre(QString chap);
    void setPage(QString page);
    void setFinAtteinte(bool b);
    virtual bool serialize(QXmlStreamWriter * w);
    virtual bool deserialize(QXmlStreamReader * r);
    virtual QStringList getHeaders();
    virtual QList<QTableWidgetItem*> getItems();

    Manga * manga();
    QString chapitre();
    QString page();
    bool finAtteinte();

private:
    Manga * m_manga;
    QString m_chapitre;
    QString m_page;
    bool m_fin_atteinte;
};

#endif // BOOKMARK_H
